import { request } from '../utils/request'

// 获取最受好评的电影列表
export const getTopRatedMovies = () => {
  return request({
    url: 'index/topRatedMovies'
  })
}

// 获取正在热映的电影列表
export const getMovieOnInfoList = () => {
  return request({
    url: 'index/movieOnInfoList'
  })
}

// 获取经典电影列表
export const getMoreClassicList = data => {
  return request({
    url: 'index/moreClassicList',
    data
  })
}

// 电影搜索接口
export const searchMovie = data => {
  return request({
    url: 'search/movies',
    data
  })
}

// 获取电影详情
export const getMovieDetail = (movieId) => {
  return request({
    url: 'movie/detail',
    data: {
      movieId
    }
  })
}